package testing;


import java.util.ArrayList;
import java.util.List;

import logicaDePredicados.LogicPredicate;

import org.junit.*;

import com.db4o.Db4oEmbedded;
import com.db4o.ObjectContainer;

public class DbRetrieveAPredicateTest {

	@Before
	public void setUp() throws Exception {
	}
	@Test
	public void testCase () throws Exception{
		ObjectContainer container=Db4oEmbedded.openFile(Db4oEmbedded.newConfiguration(), "./tpfinal/base/base.yap");
		
		try{
			
			List<LogicPredicate<?>> resultset = container.query(new predicatesAndQuerys.RetrieveALogicPredicate(new LogicPredicate<String>("ANIMAL")));
			for (LogicPredicate<?> logicPredicate : resultset) {
				System.out.println(logicPredicate);
			}
			


			}finally {
				if (container==null){
					
				}
				container.rollback();
				container.close();
			}
	}

}
